package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it.networkassets.HostInformationMaintenance;
import com.glsc.ngateway.common.api.platform.dto.it.networkassets.HostInformationMaintenanceDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @Author: xc
 * @Date: 2023/03/16
 * @Desc: domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface HostInformationMaintenanceMapper {
    HostInformationMaintenanceMapper INSTANCE = Mappers.getMapper(HostInformationMaintenanceMapper.class);

    @Mapping(target = "taskList", ignore = true)
    @Mapping(target = "bindSerialNumList", ignore = true)
    @Mapping(target = "deployedModeList", ignore = true)
    @Mapping(target = "bindSerialDetailList", ignore = true)
    HostInformationMaintenanceDto domain2dto(HostInformationMaintenance domain);

    List<HostInformationMaintenanceDto> domain2dto(List<HostInformationMaintenance> domain);

    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    HostInformationMaintenance dto2domain(HostInformationMaintenanceDto dto);

    List<HostInformationMaintenance> dto2domain(List<HostInformationMaintenanceDto> dto);
}
